<script type="text/javascript">
  $(document).ready(function(){
    $("#boton").click(function(){
        if($("#st_contrato").attr('checked') == false){
        	alert('Leia e aceite os termos do contrato para prosseguir');
          return false;
        }
        return true;
    });
  });
</script>
<table border="0" align="center" cellpadding="0" cellspacing="0" class="content-view" id="teste">
  <tr>
    <td id="messenger" colspan="2"><?php echo $this->flashMessage();?></td>
  </tr>
  <tr>
    <td align="left" class="comp-title" style="width: 200px; text-transform: uppercase;">Contrato</td>  
    <td>&nbsp;</td>
  </tr>
  
  <tr>
    <td align="center" colspan="2">
      <table border="0" align="center" cellpadding="0" cellspacing="0" width="100%" class="content-form">
        <tr>
          <td class="space-bottom" style=""></td>
        </tr>
        <tr>
          <td colspan="3" style="height: 30px">
            <?php echo $this->textarea('ds_contrato', 'ds_contrato', $this->contrato, false, 150, 24, '', 'text-align: justify;');?>
          </td>
        </tr>
        <tr>
          <td>
            <form name="form_add" method="post" action="" id="form_add">
              <table border="0" align="left" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                  <td colspan="2" style="height: 30px">
                    <?php echo $this->input('checkbox', 'st_contrato', 'st_contrato', '1', true, '', '', '', '');?>
                    Li e aceito os termos do contrato
                  </td>
                  <td class="space-bottom" style="height: 30px; text-align: right;">
                    <a href="<?php echo $this->baseUrlController?>/contrato/cod/<?php echo $this->intCodAluno?>" target="blank">Versão para impressão</a>
                  </td>
                </tr>
                
                <tr>
                  <td align="right" class="label"></td>
                  <td>
                    <?php   
                      foreach($this->arrColunas as $strKey => $arrValues){
                        //Zend_Debug::dump($arrValues);      
                        switch($arrValues['type']){
                          case 'text':
                            $strCampo = $this->input($arrValues['type'], $arrValues['name'], $arrValues['name'], isset($arrValues['default_value']) ? $arrValues['default_value'] : $this->request[$arrValues['name']], isset($arrValues['enabled']) ? $arrValues['enabled'] : true, '', $arrValues['maxlength'], '', "width: {$arrValues['width']}px;");
                          break;
                          case 'hidden':
                            $strCampo = $this->input($arrValues['type'], $arrValues['name'], $arrValues['name'], isset($arrValues['default_value']) ? $arrValues['default_value'] : $this->request[$arrValues['name']], isset($arrValues['enabled']) ? $arrValues['enabled'] : true, '', $arrValues['maxlength'], '', "width: {$arrValues['width']}px;");
                          break; 
                        }   
                        echo $strCampo;
                      }
                    ?>
                  </td>
                  <td><span>&nbsp;</span></td>   
                </tr>
                <tr>  
                  <td align="left">
                    <?php 
                      echo $this->input('button', 'cancel', 'botona', '<< Voltar', true, '', '', '', '', "onclick=\"window.location='list'\"");
                    ?>
                  </td>
                  <td><span>&nbsp;</span></td>
                  <td align="right">
                    <?php 
                      echo $this->input('submit', 'save', 'boton', 'Avançar >>', true);
                    ?>
                  </td>
                </tr>
              </table>
            </form>
          </td>
        </tr>
      </table>
    </td>
  </tr>  
</table>